﻿#region Copyright

//  ======================================================
//      Copyright (c) 2011 Toulr All rights reserved.
//     
//      The use and distribution terms for this software are contained in the file
//      named license.txt, which can be found in the root of this distribution.
//      By using this software in any fashion, you are agreeing to be bound by the
//      terms of this license.
//     
//     You must not remove this notice, or any other, from this software.
//  ======================================================

#endregion

#region Using Namespaces

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Toulr.Domains.Account;
using Toulr.Domains.System;

#endregion

namespace Toulr.Domains.Business
{
    /// <summary>
    ///   支付信息记录
    /// </summary>
    public class Bill
    {
        #region Property

        /// <summary>
        ///   记录ID
        /// </summary>
        [Key]
        public Int32 Id { get; set; }

        /// <summary>
        ///   支付人
        /// </summary>
        public int PayUserId { get; set; }

        /// <summary>
        ///   支付时间
        /// </summary>
        [Required]
        public DateTime PayTime { get; set; }

        /// <summary>
        ///   已支付金额
        /// </summary>
        public float Paid { get; set; }

        /// <summary>
        ///   支付标识
        /// </summary>
        [MaxLength(100)]
        public String BankId { get; set; }

        /// <summary>
        ///   是否支付成功
        /// </summary>
        public bool Success { get; set; }

        /// <summary>
        /// 与该订单关联的用户帐号ID
        /// </summary>
        public int UserAccountId { get; set; }

        #endregion

        #region Associaction Objects
        /// <summary>
        ///   支付人
        /// </summary>
        [NotMapped]
        public virtual User PayUser
        {
            get { throw new NotImplementedException(); }
        }

        /// <summary>
        ///   订单信息
        /// </summary>
        [NotMapped]
        public virtual ICollection<Order> Orders
        {
            get { throw new NotImplementedException(); }
        }

        /// <summary>
        ///   支付方式
        /// </summary>
        [NotMapped]
        public virtual Banks Bank
        {
            get { throw new NotImplementedException(); }
        }

        #endregion

    }
}